package com.chinasofti.map;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Demo02 {
    public static void main(String[] args) {
        Map<String,String> map = new HashMap<>();
        map.put("张三","长春");
        map.put("张三","长春");
        map.put("李四","香港");
        map.put("阿三","广东");
        Set<Map.Entry<String, String>> entrySet = map.entrySet();
        for (Map.Entry<String, String> str:entrySet){
            String k = str.getKey();
            String v = str.getValue();
            System.out.println(k+"--"+v);
        }
    }
}
